3.839 \(\int \frac{x^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx\)

Optimal. Leaf size=73 \[ \frac{x^{m+1} (A b-a B)}{a b (a+b x)}-\frac{x^{m+1} (A b m-a B (m+1)) \, _2F_1\left (1,m+1;m+2;-\frac{b x}{a}\right )}{a^2 b (m+1)} \]

[Out]

((A*b - a*B)*x^(1 + m))/(a*b*(a + b*x)) - ((A*b*m - a*B*(1 + m))*x^(1 + m)*Hypergeometric2F1[1, 1 + m, 2 + m,
-((b*x)/a)])/(a^2*b*(1 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.0296815, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {27, 78, 64} \[ \frac{x^{m+1} (A b-a B)}{a b (a+b x)}-\frac{x^{m+1} (A b m-a B (m+1)) \, _2F_1\left (1,m+1;m+2;-\frac{b x}{a}\right )}{a^2 b (m+1)} \]

Antiderivative was successfully verified.

[In]

Int[(x^m*(A + B*x))/(a^2 + 2*a*b*x + b^2*x^2),x]

[Out]

((A*b - a*B)*x^(1 + m))/(a*b*(a + b*x)) - ((A*b*m - a*B*(1 + m))*x^(1 + m)*Hypergeometric2F1[1, 1 + m, 2 + m,
-((b*x)/a)])/(a^2*b*(1 + m))

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 64

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c^n*(b*x)^(m + 1)*Hypergeometric2F1[-n, m +
 1, m + 2, -((d*x)/c)])/(b*(m + 1)), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[m] && (IntegerQ[n] || (GtQ[
c, 0] &&  !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-(d/(b*c)), 0])))

Rubi steps

\begin{align*} \int \frac{x^m (A+B x)}{a^2+2 a b x+b^2 x^2} \, dx &=\int \frac{x^m (A+B x)}{(a+b x)^2} \, dx\\ &=\frac{(A b-a B) x^{1+m}}{a b (a+b x)}-\frac{(A b m-a B (1+m)) \int \frac{x^m}{a+b x} \, dx}{a b}\\ &=\frac{(A b-a B) x^{1+m}}{a b (a+b x)}-\frac{(A b m-a B (1+m)) x^{1+m} \, _2F_1\left (1,1+m;2+m;-\frac{b x}{a}\right )}{a^2 b (1+m)}\\ \end{align*}

Mathematica [A]  time = 0.0397282, size = 63, normalized size = 0.86 \[ \frac{x^{m+1} \left (\frac{(a B (m+1)-A b m) \, _2F_1\left (1,m+1;m+2;-\frac{b x}{a}\right )}{m+1}+\frac{a (A b-a B)}{a+b x}\right )}{a^2 b} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^m*(A + B*x))/(a^2 + 2*a*b*x + b^2*x^2),x]

[Out]

(x^(1 + m)*((a*(A*b - a*B))/(a + b*x) + ((-(A*b*m) + a*B*(1 + m))*Hypergeometric2F1[1, 1 + m, 2 + m, -((b*x)/a
)])/(1 + m)))/(a^2*b)

________________________________________________________________________________________

Maple [F]  time = 0.076, size = 0, normalized size = 0. \begin{align*} \int{\frac{{x}^{m} \left ( Bx+A \right ) }{{b}^{2}{x}^{2}+2\,abx+{a}^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x)

[Out]

int(x^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B x + A\right )} x^{m}}{b^{2} x^{2} + 2 \, a b x + a^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="maxima")

[Out]

integrate((B*x + A)*x^m/(b^2*x^2 + 2*a*b*x + a^2), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (B x + A\right )} x^{m}}{b^{2} x^{2} + 2 \, a b x + a^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="fricas")

[Out]

integral((B*x + A)*x^m/(b^2*x^2 + 2*a*b*x + a^2), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{m} \left (A + B x\right )}{\left (a + b x\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**m*(B*x+A)/(b**2*x**2+2*a*b*x+a**2),x)

[Out]

Integral(x**m*(A + B*x)/(a + b*x)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B x + A\right )} x^{m}}{b^{2} x^{2} + 2 \, a b x + a^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(B*x+A)/(b^2*x^2+2*a*b*x+a^2),x, algorithm="giac")

[Out]

integrate((B*x + A)*x^m/(b^2*x^2 + 2*a*b*x + a^2), x)